package cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.controller;

import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.entity.Employee;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.entity.Paper;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.service.EmployeeService;
import cn.edu.sdjzu.xg.eagle.xg23_kcsj_01.service.PaperService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;



@RestController
public class PaperController {
    @Autowired
    private PaperService paperService;
    @GetMapping("paper")
    public PageInfo<Paper> get(int pageNum,  int pageSize, @RequestBody Paper paper) {
        PageInfo<Paper> paperPageInfo = paperService.get(pageNum,pageSize,paper);
        System.out.println(paperPageInfo);
        return paperPageInfo;
    }

}
